import Vue from 'vue';
import App from './App';
import router from './router';
import fastclick from 'fastclick';
import Lazyload from 'vant/lib/lazyload';

import util from './common/utils/Util';

// 样式
import '@/common/stylus/index.styl';
import 'vant/lib/vant-css/index.css';

// 加载中的图片
import LoadImage from '@/assets/common/default_image.png';

Vue.config.productionTip = false;
fastclick.attach(document.body);

Vue.use(Lazyload, {
  preLoad: 1.3,
  // error: 'dist/error.png',
  loading: LoadImage,
  attempt: 1,
  lazyComponent: true,
});

Vue.use(util);

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  render: h => h(App)
});
